using net_work.Common.Request;
using net_work.Common.Result;
using net_work.Data.DTO.Cou;
using net_work.Data.Entity.Cou;
using net_work.Data.VO.Cou;

namespace net_work.IRepository.Cou;

public interface ITeachingRepository : IRepository<Teaching>
{
    /// <summary>
    /// 插入教学
    /// </summary>
    /// <param name="teachingAddRequest">插入教学</param>
    /// <returns>插入的id</returns>
    Task<long> InsertAsync(TeachingAddRequest teachingAddRequest);

    /// <summary>
    /// 更新教学信息
    /// </summary>
    /// <param name="teachingUpdateRequest">更新教学信息</param>
    /// <returns>是否成功</returns>
    Task<bool> UpdateAsync(TeachingUpdateRequest teachingUpdateRequest);

    /// <summary>
    /// 获取教学列表
    /// </summary>
    /// <param name="request">分页请求</param>
    /// <returns>教学列表</returns>
    Task<PagedResult<TeachingResult>> GetTeachingPagedAsync(PagedRequest request);

    /// <summary>
    /// 发布教学
    /// </summary>
    /// <param name="teachingId">教学id</param>
    /// <returns>是否成功</returns>
    Task<bool> Release(long teachingId);
}